Skip to content

refactor: consolidate MCP and dump trees, standardize util imports#11

Merged
antfu merged 1 commit into
mainfrom
antfu/restructure-adapters-rpc
May 13, 2026
Merged

refactor: consolidate MCP and dump trees, standardize util imports#11
antfu merged 1 commit into
mainfrom
antfu/restructure-adapters-rpc

Conversation

@antfu
Copy link
Copy Markdown
Contributor

@antfu antfu commented May 13, 2026

Summary

  • Move all MCP code under src/adapters/mcp/ (one folder containing index.ts plus build-server.ts, stringify.ts, to-json-schema.ts, transports.ts, and tests), replacing the prior split between src/adapters/mcp.ts and src/node/mcp/.
  • Move all dump code under src/rpc/dump/ (index.ts, error.ts, static.ts, __tests__/), pulling src/node/static-dump.ts in alongside the rest — so collectStaticRpcDump and the StaticRpcDump* types now ship from devframe/rpc instead of devframe/node.
  • Standardize utility imports on devframe/utils/* across the package (replacing 18 relative ../utils/* paths) and document the convention in AGENTS.md. Build config (tsdown.config.ts, alias.ts, tsconfig.base.json) and error-doc source links updated to match.

Test plan

  • pnpm lint — passes
  • pnpm typecheck — passes
  • pnpm test — 306 passed, including refreshed tsnapi snapshots reflecting the intentional ./node./rpc API surface shift
  • pnpm build — passes

- Move all MCP code under `src/adapters/mcp/` (folder with `index.ts` +
  `build-server.ts`, `stringify.ts`, `to-json-schema.ts`, `transports.ts`,
  `__tests__/`), replacing the split between `src/adapters/mcp.ts` and
  `src/node/mcp/`.
- Move dump code under `src/rpc/dump/` (`index.ts`, `error.ts`, `static.ts`,
  `__tests__/`), pulling `src/node/static-dump.ts` in alongside the rest.
  `collectStaticRpcDump` and `StaticRpcDump*` types now ship from
  `devframe/rpc` instead of `devframe/node`.
- Replace relative `../utils/*` imports with `devframe/utils/*` across the
  package; add the convention to AGENTS.md.
- Update build config (`tsdown.config.ts`, `alias.ts`, `tsconfig.base.json`)
  and error-doc source links to match the new paths.
@netlify
Copy link
Copy Markdown

netlify Bot commented May 13, 2026

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit e45dc74
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a0439c723861c0007875ddf
😎 Deploy Preview https://deploy-preview-11--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@antfu antfu merged commit 97bc45b into main May 13, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant